package com.zx.ticket.dao;

import com.zx.ticket.entity.Movie;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MovieMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Movie record);

    int insertSelective(Movie record);

    Movie selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Movie record);

    int updateByPrimaryKey(Movie record);

    int addMovie(@Param("name") String name,
                 @Param("ename") String ename,
                 @Param("type") String type,
                 @Param("country") String country,
                 @Param("duration") String duration,
                 @Param("showtime") String showtime,
                 @Param("score") String score,
                 @Param("votes") String votes,
                 @Param("introduce") String introduce,
                 @Param("directorId") Integer directorId,
                 @Param("performerId") Integer performerId,
                 @Param("img") String img,
                 @Param("images") String images);

    List<Movie> findAll(Movie record);

    List<Movie> findById(Integer id);
}